﻿using Basic.FlowGatewayModule.Interface;
using Basic.FlowRemoteModel.NodeAuditEmp.Model;
using WeDonekRpc.ApiGateway.Attr;
using WeDonekRpc.Helper.Validate;
using WeDonekRpc.HttpApiGateway;

namespace Basic.FlowGatewayModule.Api
{
    [ApiRouteName("/flow/node/audit/emp/{name}")]
    internal class FlowNodeAuditEmpApi : ApiController
    {
        private readonly IFlowNodeAuditEmpService _Service;

        public FlowNodeAuditEmpApi ( IFlowNodeAuditEmpService service )
        {
            this._Service = service;
        }

        public NodeAuditEmpDto Get ( [NumValidate("flow.node.id.error", 1)] long nodeId )
        {
            return this._Service.Get(nodeId);
        }

        public bool Set ( [NullValidate("public.param.null")] NodeAuditEmp datum )
        {
            return this._Service.Set(datum);
        }
    }
}
